package com.zs.blog.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zs.blog.model.entity.Article;
import com.zs.blog.model.vo.ArticleRelatedVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Title: ArticleMapper
 * @Author zs
 * @Package com.zs.blog.dao
 * @Date 2024/10/13 20:10
 * @description: 文章映射接口
 */
public interface IArticleMapper extends BaseMapper<Article> {

    List<Article> selectRandomArticle(@Param("sp") Long startPosition, @Param("el") Integer randomArticleCount);

    List<ArticleRelatedVO> listRelatedArticle(@Param("articleId") Long articleId, @Param("categoryId") Long categoryId);
}
